<?php

class Tag{

	public $tag =[
		'news'=>1,
		'stu'=>1,
		
		'foreach'=>1
	];

	//[sex='2']
	public function _stu($attr,$content)
	{
		$where = isset($attr['where'])?" WHERE {$attr['where']}":'';
		
$str=<<<php
	<?php
	require_once 'db.php';
	\$sql = "select * from stu $where limit {$attr['row']} ";
	\$obj =new Db;
	\$result = \$obj->query(\$sql);
	foreach(\$result as \$field):?>
	$content;
	<?php endforeach;?>
php;
		return $str;

	}

	public function _news()
	{

	}
}